Repository navigation
docs(layer-runtime): record that a StyleX build reading Core's built layer viewport inset gets undefined variables - #12314
Conversation
…et defines every variable it reads (red)
…ead the layer viewport inset The INV11 gap: a StyleX build outside Core that imports the published layer viewport inset module, as a swizzled layer component does, gets an undefined variable, because the module's constants resolve only inside Core's own build. The consumer build test shows it as an expected failure.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
|
/approve-spec 17ef1e8 |
PR Analysis Report🔎 Preview ·
|
| Component | Size | LoC | Visual · A11y · RTL |
|---|---|---|---|
| LayerProvider | 4.4 kB (0) · 20 B CSS (0) | — | ✓ · ✓ · ✗ |
| layer | — | — | — · ✓ · — |
| Layer | — | — | ✓ · ✓ · — |
Package size: no published package changed; no new dependencies.
Touched components checked; for the full suites, add ci:run-visual for Visual, ci:run-a11y for Accessibility, ci:run-rtl for RTL.
Generated by PR Enrichment workflow | View full report
There was a problem hiding this comment.
Changes requested: the INV11 gap is real for builds that read Core's built entry, but the record and the title state it more broadly than the test shows.
- The new gap paragraph (
docs/architecture/layer-runtime.mdlines 759–762), its verification row (line 959) and the title say every StyleX build outside Core gets undefined variables because the constants resolve only inside Core's build, yet the test covers only a build that resolves the module to its builtdistfile, while a build that compiles the published source entry (src/Layer/layerViewportInset.stylex.ts, which Astryx's own Vite and Next.js build helpers resolve to) defines all three constants, so please scope that wording to builds that resolve the built file.
Non-blocking: it.fails also passes when the test errors for an unrelated reason, such as a wrong alias path, so pinning today's three undefined references in a plain it would make the row fail both when the gap closes and when the harness breaks.
Claims and files checked
Review mode: same-head; reason: none
- Claim: every StyleX build outside Core that imports the published module gets undefined variables. False as stated: true for a build that reads the built file, false for one that compiles the published source entry.
- Claim: a swizzled layer component imports the module by its published path. Verified in the swizzle module graph.
- Claim: the record adds a gap paragraph, a
verified_byentry and a verification row, and leaves INV11's text unchanged. Verified. - Claim: the test builds the entry as Core publishes it. Verified: its output equals Core's own
distbuild of that file. - Claim: the test compiles an app module reading three constants and checks that every referenced variable is defined. Verified.
- Claim:
it.failskeeps CI green and fails once the gap closes. Verified; it also stays green on unrelated errors. - Claim: StyleX recognises a
.stylexmodule from its import specifier, so renaming the built file changes nothing. Verified in the StyleX compiler. - Claim: an app build resolves constants only from ones it compiled itself. Verified: the app CSS keeps unresolved variable references.
- Claim:
stylex.defineConststhrows at run time unless compiled. Verified in the StyleX runtime. - Claim: variables defined once on
:rootwould resolve the keyboard cap and themed spacing there. Verified by how custom properties substitute. - Claim: the writing rubric results hold. Verified.
- Claim: the test reports one expected failure, fails without
it.fails, the source-build test still passes and the knowledge check passes. Verified by running each. - Claim: the listed overlapping pull requests touch other parts of the record, the named ones merge cleanly and the others already conflict with main, and the open
liftconstant change does not touch the new test. Verified by test merges. - Claim: the change alters no behavior. Verified: no public API row and no shipped file changes.
- File
docs/architecture/layer-runtime.md: blocking finding on the gap's scope. - File
packages/core/src/Layer/layerViewportInset.consumer-build.test.mjs: non-blocking note onit.fails.
…; the test asserts it A build that compiles the published source entry defines the constants, so the INV11 gap names a StyleX build that resolves the module to its built dist file. The consumer build test now asserts the three undefined references, so it fails both when the gap closes and when its harness breaks.
|
/approve-spec 02d521b |
There was a problem hiding this comment.
Changes requested: the record paragraph, its verification row and the new test agree and are correct; two clauses in the description's overlap note are false at the listed pull requests' current heads.
- The overlap note says none of the listed pull requests touches
Layer/layerViewportInset*, but #12307 adds a test case topackages/core/src/Layer/layerViewportInset.source-build.test.mjs, so please narrow that clause, for example to "none touchesLayer/layerViewportInset.stylex.tsor the new test; #12307 adds a case tolayerViewportInset.source-build.test.mjs". - Regression: the overlap note says each listed pull request edits
docs/architecture/layer-runtime.md, but #8095's current head no longer changes that file, so please drop it from the list or say it no longer edits the record.
Claims and files checked
Review mode: same-head; reason: none
- Changed rules (0).
- Claim: a StyleX build outside Core that resolves the module to its built file reads the gutter and caps as variables Core's stylesheet does not define, so the declaration is invalid. Verified by the new test (three undefined references).
- Claim: a swizzled layer component imports the module by its published path. Verified in the swizzle module graph.
- Claim: a build that compiles the published source entry defines them. Verified: compiled in the app's own build, all three constants are inlined.
- Claim: the pull request records the gap under INV11, adds a test that asserts it, and changes no behavior. Verified: the record diff is additions only and the test ships in no package.
- Claim: the record gains a Current gaps paragraph, a
verified_byentry and an "INV11 gap" verification row. Verified. - Claim: the test builds the entry as Core publishes it, compiles an app file that reads the three constants with the app's own StyleX, and asserts that the three variables it references are ones Core's stylesheet does not define. Verified.
- Claim: the test fails when the gap closes and when its harness breaks. Verified with a copy that compiles the source entry and a copy whose alias points at a missing file.
- Claim: the StyleX behaviour the description cites (specifier-based
.stylexdetection, constants resolved only from definitions the app compiled,defineConststhrowing uncompiled, per-layer values resolving on:root). Verified. - Claim: the writing rubric results R1 to R7 hold for the added record text. Verified.
- Claim: the new test, the source-build test and the knowledge check pass. Verified.
- Claim: each listed pull request edits other parts of the record. False: #8095 no longer changes it; the other 16 do.
- Claim: none of the listed pull requests edits the paragraph, entry or row this one adds. Verified by test merges.
- Claim: all but #8485 merge cleanly with this change in the record, and #8485 already conflicts with main there. Verified by test merges.
- Claim: none of the listed pull requests touches
Layer/layerViewportInset*or the new test. False: #12307 changeslayerViewportInset.source-build.test.mjs; none touches the new test. - Claim: the land path covers records and a test only. Verified.
- File
docs/architecture/layer-runtime.md: clear. - File
packages/core/src/Layer/layerViewportInset.consumer-build.test.mjs: clear.
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet because the pull request is a draft; it runs once the pull request is marked ready for review, and the merge guard requires it to pass.
The record paragraph, its verification row and the new test agree, and the corrected overlap note now holds at every listed pull request's current head, so nothing is left to change.
Claims and files checked
Review mode: same-head; reason: none
- Changed rules (0).
- Claim: a StyleX build outside Core that resolves the module to its built file reads the gutter and caps as variables Core's stylesheet does not define, so the declaration is invalid. Verified by the new test (three undefined references).
- Claim: a swizzled layer component imports the module by its published path. Verified in the swizzle module graph.
- Claim: a build that compiles the published source entry defines them. Verified: compiled in the app's own build, all three constants are inlined.
- Claim: the pull request records the gap under INV11, adds a test that asserts it, and changes no behavior. Verified: the record diff is additions only and the test ships in no package.
- Claim: the record gains a Current gaps paragraph, a
verified_byentry and an "INV11 gap" verification row. Verified. - Claim: the test builds the entry as Core publishes it, compiles an app file that reads the three constants with the app's own StyleX, and asserts that the three variables it references are ones Core's stylesheet does not define. Verified.
- Claim: the test fails when the gap closes and when its harness breaks. Verified with a copy that compiles the source entry and a copy whose alias points at a missing file.
- Claim: the StyleX behaviour the description cites (specifier-based
.stylexdetection, constants resolved only from definitions the app compiled,defineConststhrowing uncompiled, per-layer values resolving on:root). Verified. - Claim: the writing rubric results R1 to R7 hold for the added record text. Verified.
- Claim: the new test, the source-build test and the knowledge check pass. Verified.
- Claim: all listed pull requests but #8095 edit other parts of the record, and #8095's current head no longer changes it. Verified at their current heads.
- Claim: none of them edits the paragraph, entry or row this one adds. Verified by test merges.
- Claim: all but #8485 merge cleanly with this change in the record, and #8485 already conflicts with main there. Verified by test merges.
- Claim: none touches
Layer/layerViewportInset.stylex.tsor the new test, and #12307 adds a case tolayerViewportInset.source-build.test.mjs. Verified. - Claim: the land path covers records and a test only. Verified.
- File
docs/architecture/layer-runtime.md: clear. - File
packages/core/src/Layer/layerViewportInset.consumer-build.test.mjs: clear.
…pr12314 # Conflicts: # docs/architecture/layer-runtime.md
|
/approve-spec a59d8ce |
There was a problem hiding this comment.
Changes requested: the record paragraph, its verification row and the new test are correct and agree at this head; one claim in the description's overlap note is not true for the current heads of the pull requests it lists.
- Regression: the overlap note says all but #8485 merge cleanly with this change in
docs/architecture/layer-runtime.md, but #8125, #8133, #8201 and #9816 also conflict withmainthere (and so with this change), and #11112, #11894 and #12307 have landed, so please restate that clause for the current heads or drop the overlap note.
Claims and files checked
Review mode: same-head; reason: none
- Changed rules (0): none.
- Claim: a StyleX build outside Core that resolves the module to its built file reads the gutter and caps as variables Core's stylesheet does not define, so the declaration is invalid. Verified by the new test (three undefined references).
- Claim: a swizzled layer component imports the module by its published path. Verified in the swizzle module graph, which keeps a StyleX module on its exported path.
- Claim: a build that compiles the published source entry defines them. Verified: compiled in the app's own build, all three constants are inlined.
- Claim: the pull request records the gap under INV11, adds a test that asserts it, and changes no behavior. Verified: the record diff is additions only and the test ships in no package.
- Claim: the record gains a Current gaps paragraph, a
verified_byentry and an "INV11 gap" verification row. Verified. - Claim: the test builds the entry as Core publishes it, compiles an app file that reads the three constants with the app's own StyleX, and asserts that the three variables it references are ones Core's stylesheet does not define. Verified.
- Claim: the test fails when the gap closes and when its harness breaks. Verified with a copy that compiles the source entry and a copy whose alias points at a missing file.
- Claim: the StyleX behaviour the description cites (specifier-based
.stylexdetection, constants resolved only from definitions the app compiled,defineConststhrowing uncompiled, per-layer values resolving on:root). Verified. - Claim: the writing rubric results R1 to R7 hold for the added record text. Verified.
- Claim: the new test, the source-build test and the knowledge check pass. Verified at this head.
- Claim: all listed pull requests but #8095 edit other parts of the record, and #8095's current head no longer changes it. Verified at their current heads.
- Claim: none of them edits the paragraph, entry or row this one adds. Verified by test merges.
- Claim: all but #8485 merge cleanly with this change in the record, and #8485 already conflicts with main there. False: #8125, #8133, #8201 and #9816 also conflict with main there, and #11112, #11894 and #12307 have landed.
- Claim: none touches
Layer/layerViewportInset.stylex.tsor the new test, and #12307 adds a case tolayerViewportInset.source-build.test.mjs. Verified. - Claim: the land path covers records and a test only. Verified.
- File
docs/architecture/layer-runtime.md: clear; the finding concerns the description's note about it. - File
packages/core/src/Layer/layerViewportInset.consumer-build.test.mjs: clear.
There was a problem hiding this comment.
Approved pending CI: CI is still running on this head, and test-node (4/9) failed on a 30-second timeout in packages/cli/api/render/render.interactive.test.mjs, a CLI render test this pull request does not change; please re-run that job, since the merge guard requires every required check to pass.
The record paragraph, its verification row and the new test agree, and the overlap note still holds for the current heads of every pull request it lists against the current main.
Claims and files checked
Review mode: same-head; reason: none
- Changed rules (0): none.
- Claim: a StyleX build outside Core that resolves the module to its built file reads the gutter and caps as variables Core's stylesheet does not define, so the declaration is invalid. Verified by the new test (three undefined references).
- Claim: a swizzled layer component imports the module by that path. Verified in the swizzle module graph, which keeps a StyleX module on its exported path.
- Claim: a build that compiles the published source entry defines them. Verified: compiled in the app's own build, every constant is inlined.
- Claim: the pull request records the gap under INV11, adds a test that asserts it, and changes no behavior. Verified: the record diff is additions only and the test ships in no package.
- Claim: the record gains a Current gaps paragraph, a
verified_byentry and an "INV11 gap" verification row. Verified. - Claim: the test builds the entry as Core publishes it, compiles an app file that reads the three constants with the app's own StyleX, and asserts that the three variables it references are ones Core's stylesheet does not define. Verified.
- Claim: the test fails when the gap closes and when its harness breaks. Verified with a copy whose app build compiles the source entry and a copy whose alias names a missing file.
- Claim: StyleX detects a
.styleximport from its specifier, resolves constants only from definitions it compiled, throws on an uncompileddefineConsts, and definitions on:rootwould resolve per-layer values at the root. Verified in the StyleX compiler and runtime and by custom-property semantics. - Claim: the writing rubric results R1 to R7 hold for the added record text. Verified.
- Claim: the new test, the source-build test and the knowledge check pass. Verified at this head.
- Claim: the open listed pull requests other than #8095 edit other parts of the record, and #8095 no longer changes it. Verified at their current heads.
- Claim: none of them edits the paragraph, entry or row this one adds. Verified by test merges against the current
mainand this head. - Claim: #12179, #11859, #10126, #10124, #10095, #8217, #8084 and #8080 merge cleanly with
mainand with this change in the record. Verified. - Claim: #9816, #8485, #8201, #8133 and #8125 already conflict with
mainthere, and so with this change. Verified: the same conflicts with and without this change. - Claim: #11112 and #11894 have merged and #12307 is closed. Verified.
- Claim: none of them touches the viewport inset module or the new test. Verified.
- Claim: the land path covers records and a test only. Verified.
- File
docs/architecture/layer-runtime.md: clear. - File
packages/core/src/Layer/layerViewportInset.consumer-build.test.mjs: clear.
|
/approve-spec 90c6163 |
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head because the pull request is a draft again; it runs once the pull request is marked ready for review, and the merge guard requires it to pass.
This head only merges main and leaves this pull request's own changes as they were: the record paragraph, its verification row and the new test agree, and the overlap note still holds against the current main.
Claims and files checked
Review mode: carry-forward; reason: none
- Changed rules (0): none.
- Claim: a StyleX build outside Core that resolves the module to its built file reads the gutter and caps as variables Core's stylesheet does not define, so the declaration is invalid. Verified by the new test (three undefined references).
- Claim: a swizzled layer component imports the module by that path. Verified in the swizzle module graph, which keeps a StyleX module on its exported path.
- Claim: a build that compiles the published source entry defines them. Verified: compiled in the app's own build, every constant is inlined.
- Claim: the pull request records the gap under INV11, adds a test that asserts it, and changes no behavior. Verified: the record diff is additions only and the test ships in no package.
- Claim: the record gains a Current gaps paragraph, a
verified_byentry and an "INV11 gap" verification row. Verified. - Claim: the test builds the entry as Core publishes it, compiles an app file that reads the three constants with the app's own StyleX, and asserts that the three variables it references are ones Core's stylesheet does not define. Verified.
- Claim: the test fails when the gap closes and when its harness breaks. Verified with a copy whose app build compiles the source entry and a copy whose alias names a missing file.
- Claim: StyleX detects a
.styleximport from its specifier, resolves constants only from definitions it compiled, throws on an uncompileddefineConsts, and definitions on:rootwould resolve per-layer values at the root. Verified in the StyleX compiler and runtime and by custom-property semantics. - Claim: the writing rubric results R1 to R7 hold for the added record text. Verified.
- Claim: the new test, the source-build test and the knowledge check pass. Verified on the same patch; nothing they read changed in the merge of
main. - Claim: the open listed pull requests other than #8095 edit other parts of the record, and #8095 no longer changes it. Verified at their current heads.
- Claim: none of them edits the paragraph, entry or row this one adds. Verified by test merges against the current
mainand this head. - Claim: #12179, #11859, #10126, #10124, #10095, #8217, #8084 and #8080 merge cleanly with
mainand with this change in the record. Verified. - Claim: #9816, #8485, #8201, #8133 and #8125 already conflict with
mainthere, and so with this change. Verified: the same conflicts with and without this change. - Claim: #11112 and #11894 have merged and #12307 is closed. Verified.
- Claim: none of them touches the viewport inset module or the new test. Verified.
- Claim: the land path covers records and a test only. Verified.
- File
docs/architecture/layer-runtime.md: clear. - File
packages/core/src/Layer/layerViewportInset.consumer-build.test.mjs: clear.
|
/approve-spec 1fe6277 |
There was a problem hiding this comment.
Approved: CI passed on this head.
The record paragraph, its verification row and the new test agree, the new test passes in CI on this head, and the overlap note still holds against the current main.
Claims and files checked
Review mode: same-head; reason: none
- Changed rules (0): none.
- Claim: a StyleX build outside Core that resolves the module to its built file reads the gutter and caps as variables Core's stylesheet does not define, so the declaration is invalid. Verified by the new test (three undefined references), which passes in CI on this head.
- Claim: a swizzled layer component imports the module by that path. Verified in the swizzle module graph, which keeps a StyleX module on its exported path.
- Claim: a build that compiles the published source entry defines them. Verified: compiled in the app's own build, every constant is inlined.
- Claim: the pull request records the gap under INV11, adds a test that asserts it, and changes no behavior. Verified: the record diff is additions only and the test ships in no package.
- Claim: the record gains a Current gaps paragraph, a
verified_byentry and an "INV11 gap" verification row. Verified. - Claim: the test builds the entry as Core publishes it, compiles an app file that reads the three constants with the app's own StyleX, and asserts that the three variables it references are ones Core's stylesheet does not define. Verified.
- Claim: the test fails when the gap closes and when its harness breaks. Verified with a copy whose app build compiles the source entry and a copy whose alias names a missing file.
- Claim: StyleX detects a
.styleximport from its specifier, resolves constants only from definitions it compiled, throws on an uncompileddefineConsts, and definitions on:rootwould resolve per-layer values at the root. Verified in the StyleX compiler and runtime and by custom-property semantics. - Claim: the writing rubric results R1 to R7 hold for the added record text. Verified.
- Claim: the new test, the source-build test and the knowledge check pass. Verified: both tests pass in CI on this head, and the knowledge check passes at this head.
- Claim: the open listed pull requests other than #8095 edit other parts of the record, and #8095 no longer changes it. Verified at their current heads.
- Claim: none of them edits the paragraph, entry or row this one adds. Verified by test merges against the current
mainand this head. - Claim: #12179, #11859, #10126, #10124, #10095, #8217, #8084 and #8080 merge cleanly with
mainand with this change in the record. Verified, including the new heads of #11859 and #8080. - Claim: #9816, #8485, #8201, #8133 and #8125 already conflict with
mainthere, and so with this change. Verified: the same conflicts with and without this change. - Claim: #11112 and #11894 have merged and #12307 is closed. Verified.
- Claim: none of them touches the viewport inset module or the new test. Verified.
- Claim: the land path covers records and a test only. Verified.
- File
docs/architecture/layer-runtime.md: clear. - File
packages/core/src/Layer/layerViewportInset.consumer-build.test.mjs: clear.
Summary
A StyleX build outside Core that resolves the published
@astryxdesign/core/Layer/layerViewportInset.stylexmodule to its builtdistfile reads the layer gutter and caps as CSS variables that Core's stylesheet does not define, so the declaration that uses them is invalid. A swizzled layer component imports the module by that path. A build that compiles the published source entry (thesourceexport condition) defines them. This PR records that as a current gap inarchitecture:layer-runtimeINV11 and adds a consumer build test that asserts the gap. It changes no behavior: the fix waits on an owner decision.What changes
docs/architecture/layer-runtime.md: an "INV11 gap" paragraph under Current gaps (a StyleX build outside Core that resolves the module to its built file gets an undefined variable; a build of the source entry does not; no record decides the fix), the new test inverified_by, and an "INV11 gap" verification row.packages/core/src/Layer/layerViewportInset.consumer-build.test.mjs: builds the entry as Core publishes it, compiles an app file that readsmaxBlockSize,maxInlineSizeandgutterBlockStartwith the app's own StyleX, and asserts that the three variables it references are ones Core's stylesheet does not define. The test fails when the gap closes, and also when its harness breaks (anit.failswould stay green then).Why it is a gap, not a quick fix
.stylexmodule from its specifier, so renaming the built file changes nothing.defineConstsvalues from a precompiled package never reach it.stylex.defineConststhrows at run time unless compiled, so the module cannot ship uncompiled.:rootwould resolve the per-layer keyboard cap and themed spacing there, not on the layer.Writing rubric results
#+ digits,/pull/,/issues/).INV11 gap:form, not what is built or what goes first.Testing
vitest run packages/core/src/Layer/layerViewportInset.consumer-build.test.mjs: passes, with the app's CSS referencing three undefined variables.layerViewportInset.source-build.test.mjsstill passes.pnpm check:knowledgepasses.Overlap checked: #12307, #12179, #11894, #11859, #11112, #10126, #10124, #10095, #9816, #8485, #8217, #8201, #8133, #8125, #8095, #8084, #8080 (the open ones but #8095 edit other parts of
docs/architecture/layer-runtime.md, and #8095's current head no longer changes it; none edits the Current gaps paragraph,verified_byentry or verification row this adds; #12179, #11859, #10126, #10124, #10095, #8217, #8084 and #8080 merge cleanly withmainand with this change in that file; #9816, #8485, #8201, #8133 and #8125 already conflict withmainthere, and so with this change; #11112 and #11894 have merged and #12307 is closed; none touchesLayer/layerViewportInset.stylex.tsor the new test)Owner: fix-loop lane 4. Land path: Specs consistency stamp, CodeBunny, CI, then the shipper merges (records and a test only).